
// 引入windi css
import '@/plugins/unocss'

// 导入全局的svg图标
import '@/plugins/svgIcon'

// 初始化多语言
import { setupI18n } from '@/plugins/vueI18n'

// 引入状态管理
import { setupStore } from '@/store'

// 全局组件
import { setupGlobCom } from '@/components'

// 引入element-plus
import { setupElementPlus } from '@/plugins/elementPlus'

// 引入全局样式
import '@/styles/index.less'

// 引入动画
import '@/plugins/animate.css'

// 路由
import { setupRouter } from './router'

// 权限
import { setupPermission } from './directives'

import { createApp } from 'vue'

import App from './App.vue'

import './permission'

// 高级表格
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

// 视频

// import videoPlay from 'vue3-video-play' // 引入组件 
// import 'vue3-video-play/dist/style.css' // 引入css 
// import { videoPlay } from 'vue3-video-play/lib/index' 


// 重置样式表
import 'reset.css'

function useTable(app: any) {
  app.use(VXETable)
}
import { createPinia } from 'pinia'

import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import vue3SeamlessScroll from "vue3-seamless-scroll";

const pinia = createPinia()

pinia.use(piniaPluginPersistedstate)

const app = createApp(App)
app.use(pinia)
// app.use(videoPlay)
// 创建实例
const setupAll = async () => {
  await setupI18n(app)

  setupStore(app)

  setupGlobCom(app)

  setupElementPlus(app)

  setupRouter(app)

  setupPermission(app)

  app.use(useTable) //高级表格

  app.use(vue3SeamlessScroll);
  // app.use(DataV, { classNamePrefix: 'dv-' });
  app.mount('#app')
}

setupAll()
